<div class="primary">
    <div class="main-content">
    <?php
    if($keyword != '') {
        ?>
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><span>&gt;</span></span>
            	</span>
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/tags/"><span itemprop="title">Tags</span></a>
            		<span class="arrow"><span>&gt;</span></span>
            	</span>
            </div>
            <h1 class="tags_title"><?=$keyword?></h1>
            <h3 class="tags_description">Tin tức cập nhật liên quan đến từ khóa: <?=$keyword?></h3>
            <?php
            foreach($list_news_tags as $news) {
                ?>
                <div class="cat-news-tags-box">
                    <div class="img">
                        <a href="<?=generate_detail_url($news)?>"><img alt="<?=$news['new_title']?>" src="<?=$news['new_picture']?>" /></a>
                    </div>
                    <div class="cont">
                        <a href="<?=generate_detail_url($news)?>"><h2><?=str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',$news['new_title'])?></h2></a>
                        <p class="date">Cập nhật vào <?=getDateTime('','1','1','1','',$news['new_date'])?></p>
                        <p><?=$news['new_teaser'] != '' ? str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',cut_string(removeHTML($news['new_teaser']),300)) : str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',cut_string(removeHTML($news['new_detail']),300))?></p>
                        <ul class="tags_item_list">
                        <?php
                        $arr_tags_item = explode(',',$news['new_tags']);
                        $tags_item_total= count($arr_tags_item) - 1;
                        for($i = 0; $i < $tags_item_total; $i++) {
                            ?>
                            <li>
                                <a href="<?=DOMAIN.'/tags/'.$arr_tags_item[$i]?>"><?=$arr_tags_item[$i] == $keyword ? '<span class="tags_hightlight">'.$arr_tags_item[$i].'</span>' : $arr_tags_item[$i]?></a>
                                <?=$i != ($tags_item_total-1) ? ',' : '&nbsp'?>
                            </li>
                            <?
                        }
                        ?>
                        </ul>
                    </div>
                </div><!-- End cat-news-tags-box -->
                <?
            }
            ?>
        </div><!-- End main-content-left -->
        <?
    }else {
        ?>
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><span>&gt;</span></span>
            	</span>
            </div>
            <h1 class="tags_title">Tags - VnUpdate.net tin tức cập nhật</h1>
            <h3 class="tags_description">Các tags(từ khóa) thường xuyên được sử dụng</h3>
            <div class="all_tags">
            <?php
            foreach($arr_tags_all as $tags_key=>$tags_level) {
                switch($tags_level) {
                    case 4 :
                    case 5 :
                        $style = 'style="font-size: 13px;"';
                        break;
                    case 6 :
                    case 7 :
                    case 8 :
                    case 9 :
                        $style = 'style="font-size: 14px;"';
                        break;
                    case 10 :
                    case 11 :
                    case 12 :
                    case 13 :
                    case 14 :
                        $style = 'style="font-size: 16px;"';
                        break;
                    case 15 :
                    case 16 :
                    case 17 :
                    case 18 :
                    case 19 :
                        $style = 'style="font-size: 18px;"';
                        break;
                    default :
                        $style = 'style="font-size: 22px;"';
                        break;
                }
                ?>
                <a href="<?=DOMAIN.'/tags/'.$tags_key?>" <?=$style?>><?=$tags_key?></a>
                <?
            }
            ?>
            </div>
        </div><!-- End main-content-left -->
        <?
    }
    ?>
        
        <div class="main-content-right">
            <img alt="quang cao" src="../themes/img/adv2.jpg" />
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->